using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;

public class GameDefine 
{
    public static Vector3 _Gravity = new Vector3(0,-9.81f,0);
    public static float deltaTime =Time.deltaTime;

    public static Transform _Camera;


    //Player

    public static Vector3 _Ground_dst = new Vector3(0, -0.02f, 0);  //实际上脚着地 还要算上 Contorller.skinWidth 就是说实际上看起来render不会着地



    //Layer
    public static int Ground_LayerMask;
    public static int Player_LayerMask;
    public static int Enemy_LayerMask;


    //tag
    public static string WeaponTag = "Weapon";




    //物品图标父目录
    public static string prop_root = "Icon/Prop_Icon/";
    //装备图标父目录
    public static string eq_root  = "Icon/EQ_Icon/";
    //材料图标父目录
    public static string mat_root = "Icon/Mat_Icon/";

    //装备部位类别
    public static Dictionary<int, string> part_dct = new Dictionary<int, string>();
    public static void Init()
    {
        _Camera = GameObject.Find("Main").transform.Find("Camera").transform;

        var gb1 = GameObject.Find("Main");
        var gb2 = GameObject.Find("Camera");

        Ground_LayerMask = LayerMask.GetMask("Default");
        Player_LayerMask = LayerMask.GetMask("Player");
        Enemy_LayerMask = LayerMask.GetMask("Enemy");

;
        InitEqPartName();
    }

    public static void InitEqPartName()
    {
        part_dct[1] = "Helmet/";
        part_dct[2] = "Cloth/";
        part_dct[3] = "Capes/";
        part_dct[4] = "Pants/";
        part_dct[5] = "Boots/";
        part_dct[6] = "Weapon/";
        part_dct[7] = "Earrings/";
        part_dct[8] = "Necklaces/";
        part_dct[9] = "Rings/";
        part_dct[10] = "Belt/";
    }
    public static string GetEQ_Icon(int part)
    {
        return $"{eq_root}{part_dct[part]}";
    }
}
